home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
TECHNICA
/
AUTOCAD
/
H107.ZIP
/
PCX2DXF2.ZIP
/
REMAPCOL.LSP
< prev
Wrap
Lisp/Scheme
|
1991-05-27
|
950b
|
37 lines
;REMAPCOL.LSP
;Version 2.0 27th May 1991
;Copyright (c) 1991 Cybernetic Imagination Systems Ltd
;All Rights Reserved
;Routine to globally remap any AutoCAD colour to any other AutoCAD colour
(defun C:REMAPCOL
(/
oldcol ;old colour number
newcol ;new colour number
ss1 ;selection set
cmdtmp ;value of cmdecho on entry
)
;get user input
(setq oldcol (getint "\nOld colour number: "))
(setq newcol (getint "\nNew colour number: "))
;disable command echo
(setq cmdtmp (getvar "CMDECHO"))
(setvar "CMDECHO" 0)
;find entities and change
(setq ss1 (ssget "X" (list (cons 62 oldcol))))
(if (/= ss1 nil)
(command "CHPROP" ss1 "" "C" newcol "")
)
;reset command echo to value on entry
(setvar "CMDECHO" cmdtmp)
;clean exit
(princ)
)